/*
 * 
 * author     date                    function                 purpose
 * wuwentao   20111122             base structure               */

package com.badlogicgames.framwork;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.GLCommon;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector3;

public class MainMenuScreen extends Screen {
	OrthographicCamera guiCam;
	SpriteBatch batcher;


	public MainMenuScreen (Game game) {
		super(game);
		guiCam = new OrthographicCamera(GameConstant.CAMERA_WIDTH, GameConstant.CAMERA_HEIGHT);
		guiCam.position.set(GameConstant.CAMERA_WIDTH / 2, GameConstant.CAMERA_HEIGHT / 2, 0);
		batcher = new SpriteBatch();
		
	}

	@Override
	public void update (float deltaTime) {
		
	}

	@Override
	public void present (float deltaTime) {
		GLCommon gl = Gdx.gl;
		gl.glClearColor(1, 0, 0, 1);
		gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
		guiCam.update();
		batcher.setProjectionMatrix(guiCam.combined);

		batcher.disableBlending();
		batcher.begin();
		//batcher.draw(Assets.backgroundRegion, 0, 0, GameConstant.CAMERA_WIDTH, GameConstant.CAMERA_HEIGHT);
		batcher.end();

		batcher.enableBlending();
		batcher.begin();
		//batcher.draw(Assets.mainMenu, 0, 0, 300, 200);
		//batcher.draw(Settings.soundEnabled ? Assets.soundOn : Assets.soundOff, 0, 0, 64, 64);
		batcher.end();
	}

	@Override
	public void pause () {
		Settings.save();
	}

	@Override
	public void resume () {
	}

	@Override
	public void dispose () {
	}
}
